home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_11_08
/
1108112a
< prev
next >
Wrap
Text File
|
1993-06-07
|
249b
|
16 lines
/* bit1.c: Pack a date into an integer */
#include <stdio.h>
main()
{
unsigned int date, year = 92, mon = 8, day = 2;
date = (year << 9) | (mon << 5) | day;
printf("%04X\n",date);
return 0;
}
/* OUTPUT:
* B902 */